package org.btik.light.mobile.ui.devs.espnow.wings;


/**
 * @author lustre
 * @since 2023/4/9 0:38
 */
public interface EspnowWingsHandlers {
    byte SEND_TO_PEER = 'p';

    /*** 扑翼动作 ***/
    byte DO_ACTION = 0;

    byte SET_UP_DOWN = 0;

    byte SET_LEFT_RIGHT = 1;

    /*** 保持/滑翔动作 ***/

    byte DO_HOLD_ON = 1;

    /*** 静态姿势/滑翔姿态 ***/
    byte DO_SET_POSE = 2;

    byte LEFT_WING = 0;

    byte RIGHT_WING = 1;

    /*** 遥控器设置 ***/
    byte CONTROLLER_SETTING = 's';

    /*** 设置被控制端的mac ***/
    byte SET_PEER_MAC = 0;
    byte[] SET_UP_DOWN_VALUE = new byte[] {SEND_TO_PEER, DO_ACTION, SET_UP_DOWN, 0 , '\n'};
    byte[] SET_RIGHT_LEFT_VALUE = new byte[] {SEND_TO_PEER, DO_ACTION, SET_LEFT_RIGHT, 0, '\n' };

    byte[] HOLD_ON = new byte[]{SEND_TO_PEER, DO_HOLD_ON, '\n'};

    byte[] SET_LEFT_POSE = new byte[]{SEND_TO_PEER, DO_SET_POSE, LEFT_WING, (byte) 0, '\n'};

    byte[] SET_RIGHT_POSE = new byte[]{SEND_TO_PEER, DO_SET_POSE, RIGHT_WING, (byte) 0, '\n'};

    byte[] SET_MAC = new byte[]{CONTROLLER_SETTING, SET_PEER_MAC,
            // mac
            0, 0, 0, 0, 0, 0, '\n'
    };
}
